package com.cqs.learning;

import java.util.ArrayList;

/**
 * @author lixiaowen
 * @create 2019-09-15
 */
public class Demo2 {


    class Super {

        public void say(){

        }

        public void common(){

        }


    }

    class Suber extends Super {

        @Override
        public void say(){
            System.out.println("Suber say");
            new ArrayList<>();
        }

    }


    public void sayHello(Super sp){
        System.out.println("sp");
    }

    public void sayHello(Suber suber){
        System.out.println("suber");
    }


    public void test(){
        Super s = new Suber();
        s.say();

        Suber suber = new Suber();

        suber.common();
    }

    public void test2(){
        Super s = new Suber();
        sayHello(s);

        s.say();
    }

    public static void main(String[] args) {
        Demo2 demo2 = new Demo2();
        demo2.test2();
    }
}
